package com.act.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.act.dao.IEmployeeDao;
import com.act.domain.Employee;
import com.act.service.api.IEmployeeService;

@Service
public class EmployeeServiceImpl implements IEmployeeService{

	@Resource
	IEmployeeDao employeeDao;
	
	@Override
	public List<Employee> getAll() {
		return employeeDao.getAll();
	}

	@Override
	public List<Employee> getEmployeesByEmployeeIdOrName(String employee_id, String name) {
		return employeeDao.getEmployeesByEmployeeIdOrName(employee_id, name);
	}

	@Override
	public List<Employee> getEmployees(int state) {
		return employeeDao.getEmployees(state);
	}

	@Override
	public void add(Employee employee) {
		employeeDao.add(employee);
	}

	@Override
	public void update(Employee employee) {
		employeeDao.update(employee);
	}

	@Override
	public void delete(int id) {
		// TODO Auto-generated method stub
		employeeDao.delete(id);
	}

}
